package com.yupi.yupicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yupi.yupicturebackend.model.dto.user.UserQueryRequest;
import com.yupi.yupicturebackend.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yupicturebackend.model.vo.LoginUserVO;
import com.yupi.yupicturebackend.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author Y9000
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-09-16 12:40:07
*/
public interface UserService extends IService<User> {


    //用户注册
  long userRegister(String userAccount, String userPassword, String checkPassword);


  LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

  //获取脱敏后的登录用户信息
    LoginUserVO getLoginUserVO(User user);

    //加密算法
    String getEncryptePassword(String userPassword);


    //获取当前登录用户
    User getLoginUser(HttpServletRequest request);

  //获取脱敏后的用户信息
    UserVO getUserVO(User user);

   //获取脱敏后的用户信息 列表
   List<UserVO> getUserVoList(List< User> userList);


    //用户注销
    Boolean userLogout(HttpServletRequest request);


    //获取查询条件
    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    //判断用户是否为管理员
    boolean isAdmin(User user);

}
